package com.hyl.msg;

import java.io.File;
import java.io.FileInputStream;
import java.util.Properties;

public class ActConfig {
	private static Properties properties;
	private static final String root=ActConfig.class.getResource("").getPath().toString() ;
	public static Properties getConf() {
		return getConf(root+"activemq.conf");
	}	
	public static Properties getConf(String path) {
		if (properties == null) {
			properties = new Properties();			
			System.out.println(path);
			try {
				FileInputStream fis = new FileInputStream(new File(path));
				properties.load(fis);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return properties;
	}

}
